package cn.qiao.demo.decorator;

/**
 * desc:
 * 甜品
 * @author qiao
 * @date 2023年05月14日 12:03
 */
public class Whip extends  CondimentDecorator{

    Beverage beverage;
    double price = 20;

    public Whip(Beverage beverage) {
        this.beverage = beverage;
    }

    public String getDescription() {
        return beverage.getDescription()+": whip";
    }

    public double cost() {
        return price+beverage.cost();
    }
}
